home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / Buch / charstr.cpp < prev    next >
C/C++ Source or Header  |  1998-12-28  |  1KB  |  37 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "charstr.h"
  6. //---------------------------------------------------------------------------
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. char CKette[40];
  10. String SKette;
  11. char *ZKette;
  12.  
  13. //---------------------------------------------------------------------------
  14. __fastcall TForm1::TForm1(TComponent* Owner)
  15.     : TForm(Owner)
  16. {
  17. }
  18. //---------------------------------------------------------------------------
  19. void __fastcall TForm1::Button1Click(TObject *Sender)
  20. {
  21.   SKette = "Hallo! Das ist ein String";
  22.   Label1->Caption = SKette;
  23. }
  24. //---------------------------------------------------------------------------
  25. void __fastcall TForm1::Button2Click(TObject *Sender)
  26. {
  27.   strcpy (CKette,"Hallo! Das ist ein char-Feld");
  28.   Label2->Caption = CKette;
  29. }
  30. //---------------------------------------------------------------------------
  31. void __fastcall TForm1::Button3Click(TObject *Sender)
  32. {
  33.   ZKette = "Hallo! Das ist eine char-Kette";
  34.   Label3->Caption = ZKette;
  35. }
  36. //--------------------------------------------------------------------------- 
  37.